package com.example.shoppingmall.service;

import com.example.shoppingmall.dao.AdminJurisdictionMapper;
import com.example.shoppingmall.pojo.AdminJurisdiction;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminJurisdictionService {
    @Autowired
    private AdminJurisdictionMapper adminJurisdictionMapper;

    public List<AdminJurisdiction> AdminJurisdictionList(@Param("adminId")int adminId){
        return adminJurisdictionMapper.AdminJurisdictionList(adminId);
    }

    public int delete(@Param("id")int id){
        return adminJurisdictionMapper.delete(id);
    }

    public int add(AdminJurisdiction adminJurisdiction){
        return adminJurisdictionMapper.add(adminJurisdiction);
    }

    public AdminJurisdiction chackRoleId(@Param("roleId")int roleId,@Param("adminId")int adminId){
        return adminJurisdictionMapper.chackRoleId(roleId,adminId);
    }
}
